Skip to content

maintenance: cleanup TS typedefs tests #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2020
Merged

Conversation

mdjastrzebski
Copy link
Member

Summary

I have compacted our TS typedefs tests, so that queries with same return type are grouped together as an array, which makes the code more compact and easier to spot missing/wrong tests.


const waitForFlush: Promise<any> = flushMicrotasksQueue();
const waitGetAllBy: Promise<ReactTestInstance[]>[] = [
waitFor<ReactTestInstance[]>(() => tree.getAllByA11yLabel('label')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waitFor can work with any throwable function, maybe we can showcase that and get rid of tree.getAllBy examples?

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please!

@thymikee thymikee merged commit 3ef0064 into next May 20, 2020
@thymikee thymikee deleted the feature/cleanup-ts-tests branch May 20, 2020 08:37
thymikee pushed a commit that referenced this pull request May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants